import request from '@/utils/request'

// 区域列表
export const getRegons = params => {
  return request.get('/vm-service/node/search', {
    params
  })
}
// 点位区域搜索列表
export const getRegonslist = params => {
  return request.get('/vm-service/region/search', {
    params
  })
}
// 所属商圈
export const getBusiness = () => {
  return request.get('/vm-service/businessType')
}
// 归属合作商
export const getBelonglist = params => {
  return request.get('/user-service/partner/search', {
    params
  })
}
// 新增点位
export const addPoint = (data) => {
  return request({
    url: '/vm-service/node',
    method: 'post',
    data
  })
}
// 获取点位详情
export const getNodeDetail = (id) => {
  return request({
    url: `/vm-service/node/vmList/${id}`,
    method: 'get'
  })
}
// 点击回显详情
export const nodeSearch = (params) => {
  return request({
    url: '/vm-service/node/search',
    method: 'get',
    params
  })
}
// 删除数据
export const deleteNode = (id) => {
  return request({
    url: `/vm-service/node/${id}`,
    method: 'DELETE'
  })
}
